<template>
	<view class="wrap">
		<view class="title font-28" v-if="list.length > 0">可开票订单</view>
		<view class="model" v-if="list.length > 0">
			<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="onreachBottom">
				<view class="list flex border-bottom-1 " v-for="(item, index) in list" :key="index" @click="checkOrder(index)">
					<view class="width-10 line90">
						<u-icon name="checkmark-circle-fill" v-if="item.checked" class="middle" color="#FBD220" size="38"></u-icon>
						<i-icon icon="icontuoyuan" type="single" v-else class="mr-5 middle" size="36rpx" color="#999"></i-icon>
					</view>
					<view class="width-80">
						<view class="pad-t-b-10">
							时间：
							<text class="font24">{{ item.addtime ? item.addtime.split('T')[0] + ' ' + item.addtime.split('T')[1] : '' }}</text>
						</view>
						<view class="pad-t-b-10 s-line-text">
							订单：
							<text class="font24">{{ item.orderid }}</text>
						</view>
						<view class="pad-t-b-10">
							价格：
							<text class="font24">￥{{ item.invoice_amount }}</text>
						</view>
					</view>
					<view class="width-10 line90 u-text-right"><u-icon name="arrow-right" color="#999" size="28"></u-icon></view>
				</view>
			</scroll-view>
			<u-loadmore :status="loadText[loadStatus]" />
		</view>
		<view class="" v-else><defaultImg :show="true" :msg="'暂无可开发票订单,快去下单吧！'"></defaultImg></view>
		<view class="fixedBottomBtn">
			<view class="btnWrap">
				<view class="left width-65">
					<u-icon name="checkmark-circle-fill" @click="checkAllFun" v-if="checkAll" class="middle" color="#FBD220" size="38"></u-icon>
					<i-icon icon="icontuoyuan" @click="checkAllFun" type="single" v-else class="mr-5 middle" size="36rpx" color="#999"></i-icon>
					<text class="font-26 color-fff ml-10" @click="checkAllFun">全选</text>
					<text class="font-30 color-fff ml-20" @click="checkAllFun">{{ count }}个订单，共{{ price }}元</text>
				</view>
				<view class="right width-35" @click="goDetail">下一步</view>
			</view>
		</view>
	</view>
</template>

<script src="./orderInvoice.js"></script>

<style lang="scss" scoped>
@import './orderInvoice.scss';
</style>
